home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / prog_c / lsdoor09.zip / DOOR.H < prev    next >
Text File  |  1996-04-12  |  4KB  |  121 lines

  1. #ifndef __DOOR_ROUT_HEADER__
  2. #define __DOOR_ROUT_HEADER__
  3.  
  4. global int read_commlinks,   // Set to 1 to allow pages to come through...
  5.   dump_commlinks;            // Set to 1 to erase all current commlinks...
  6.  
  7. #ifdef _DOOR_CODE_
  8. void door_update( void );
  9. #endif
  10.  
  11. void clear_pause( void );
  12. int  pause( int allowstop=1 );
  13.  
  14. void activity( void );       // Called by s_in() after getting input
  15.  
  16. void init_update( void );    // Called by drop.cpp & door.cpp only...
  17.  
  18. void forced_update( void );  // Call this to bypass 5 second limit
  19. void update( void );
  20.  
  21. void save_commlink( int );   // Pass destination node #
  22.  
  23. uint matches( char *a, char *b );
  24. int  FindExactUserOnline( uchar *lookfor );    // Returns node or -1
  25. int  FindUserOnline( uchar *lookfor );   // (-1/Node) Removes from lookfor
  26. void PageUser( void );       // Handles user paging
  27.  
  28. void write_nodeid( void );
  29. int  read_nodeid( int );
  30.  
  31. void status_line( void );
  32.  
  33. void online_upgrade( void );
  34. void sysop_chat( void );
  35.  
  36. uint best_userserch( uchar *find ); // Returns true/false and loads usersrch
  37. uint best_username( uchar *find );  // Returns true/false and loads usersrch
  38.  
  39. global int resetDoor;   // First call to update() since a door...
  40.  
  41.  
  42.   // Door authors - You should never have to directly manipulate this:
  43. struct drop
  44. {
  45.   long charge;          // Rate currently being charged (Credits/minute)
  46.             // Set by menus                           -=Public
  47.  
  48.   char hour, rate;      // Last hour checked, and rate used       -=Private
  49.  
  50.   long marked[ 40 ];    // File numbers currently marked (-1 for empty slot)
  51.  
  52.   char redirect;        // Current redirect value
  53.   char terminal;        // Current terminal value
  54.   char lines;           // Number of lines to display before pause
  55.  
  56.   char statusline;      // 0, 1, 2, 3, or 4 line status (F1+ F2-)
  57.  
  58.     // Private: Used by Door.Cpp: update() root time unit
  59.   ulong doorlastc;      // Last (Clock) counter for update()...
  60.     // Private: Used by Drop.Cpp: activity() and update()
  61.   uint inact;           // Inactivity time left before dropping
  62.   char inact_warn;      // Flag, have we given a warning yet?
  63.     // Used by Drop.Cpp: reset_time_warn()
  64.   char time_warn;
  65.  
  66.   union
  67.   {
  68.     unsigned char settings;
  69.     struct set
  70.     {
  71.       char sysop:1;      //  Bit 0:   (0/1) Is the sysop available?
  72.       char sound:1;     //  Bit 1:   (0/1) Is sound on or off?
  73.       char lock:1;        // /Bit 2:   (0/1) Is the keyboard locked?
  74.       char screen:1;    // \Bit 3:   (0/1) Is the screen off & locked?
  75.       char snext:1;    // /Bit 4:   (0/1) Is a sysop next?
  76.       char lnext:1;    // |Bit 5:   (0/1) Is a local next?
  77.       char dnext:1;    // \Bit 6:   (0/1) Is a dos next?
  78.       char dummy:1;     // Unused (Reserved)
  79.     } set;
  80.   } s;
  81.  
  82. } global drop;
  83.  
  84.  
  85. struct nodeid           // WRITE ACCESS OWNED BY DOOR.CPP ONLY!   -=Public
  86. {
  87.   char online;          // (0/1) Node in use                  } Compared
  88.   uchar handle[ 20 ];   // User's handle                      } from 'user'
  89.   char sex;             // (0) Unknown (1) Male (2) Female    } to 'nodeid'
  90.   ulong usernum;        // User's position, match to fcon.num } by update()
  91.  
  92.   long baud;            // Initialized baud rate
  93.   char connect;         // BitFlag (0) None (1) MNP+ARQ (2) ARQ
  94.  
  95.  
  96.  
  97.   char status[ 15 ];    // Set by menus, user's current activity
  98.   char available:1;     // Set to 0 on door call, set to 1 by SOME doors
  99.  
  100.   char link;            // Current global link #
  101.   char inchat;          // (0/1) Is user in a sysop-chat?
  102. } global nodeid, readid, lastid;  // Lastid is PRIVATE to Door.Cpp
  103.  
  104.  
  105.   // Door Authors - If you need to use the CommLink standard, please contact
  106.     // LightSpeed HQ and a unique link ID and/or type ID will be granted free
  107.     // of charge.
  108.             // DISK ACCESS OWNED BY DOOR.CPP ONLY!
  109. struct commlink         // Global communications system (Multi-Node)
  110. {
  111.   char type;            // (0) Not used, (1) Message, (2) Link, (3) HangUp
  112.   char link;            // Link #, must match to be used (0=All)
  113.   char from[ 20 ];      // Author's handle (Shown in messages as <from>)
  114.   char data[ 160 ];     // Text and misc. data
  115. } global commlink;
  116.  
  117. #endif
  118.  
  119. // End of Door.H
  120.  
  121.